<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                template="../templates/principal.xhtml">

    <ui:define name="content" id="content">
        <h1 class="title ui-widget-header ui-corner-all">Bem Vindo ao Relatório de Cadastro de Acionistas</h1>

        <h:form id="frmRelAcionista" prependId="false">
            <p:ajaxStatus onstart="statusDialog.show();" onsuccess="statusDialog.hide();"/>

            <p:dialog modal="true" widgetVar="statusDialog" header="Aguarde ... Processando ..." draggable="false" closable="false">
                <p:graphicImage value="/design/ajaxloadingbar.gif" />
            </p:dialog>
            <div id="limites">
                <div id="conteudo">
                    <p:panel header="Impressão Relatório de Cadastro de Acionistas" style="text-align: center">
                        <div align="center">
                            <h:panelGrid id="display" columns="2" style="margin-bottom:50px" cellpadding="5" columnClasses="coluna1, coluna2">
                                <h:outputText value="Tipo:" />
                                <h:selectOneRadio id="tipAcionista" value="#{clienteBean.tipAcionista}" layout="pageDirection">
                                    <f:selectItem itemLabel="Todos" itemValue="T" noSelectionOption="true" />
                                    <f:selectItem itemLabel="Jurídica" itemValue="J" />
                                    <f:selectItem itemLabel="Física" itemValue="F" />
                                </h:selectOneRadio>

                                <h:outputText value="Ordenação:" />
                                <h:selectOneRadio id="order" value="#{clienteBean.order}" layout="pageDirection">
                                    <f:selectItem itemLabel="Razão Social / Nome" itemValue="R" noSelectionOption="true" />
                                    <f:selectItem itemLabel="C.P.N.J. / C.P.F." itemValue="C" />
                                </h:selectOneRadio>

                            </h:panelGrid>
                            <p:commandButton value="Gerar Relatório" update="messages, panel" actionListener="#{clienteBean.gerarRelatorio}" />
                            <p:commandButton value="Imprimir" update="messages,display" onclick="submitform('#{request.contextPath}/relatorio','acionista')" />
                        </div>
                    </p:panel>
                </div>
            </div>

        </h:form>
    </ui:define>
</ui:composition>